|
|
@@ -84,7 +84,7 @@ module Agents
|
84
|
84
|
|
85
|
85
|
# Deal with failures
|
86
|
86
|
if measured_result
|
87
|
|
- final_url = boolify(interpolated['disable_redirect_follow']) ? url : measured_result.to_hash[:url]
|
|
87
|
+ final_url = boolify(options['disable_redirect_follow']) ? url : measured_result.to_hash[:url]
|
88
|
88
|
payload.merge!({ 'final_url' => final_url, 'redirected' => (url != final_url), 'response_received' => true, 'status' => current_status })
|
89
|
89
|
# Deal with headers
|
90
|
90
|
if local_headers.present?
|
|
|
@@ -104,7 +104,7 @@ module Agents
|
104
|
104
|
|
105
|
105
|
def ping(url)
|
106
|
106
|
result = faraday.get url
|
107
|
|
- result.status > 0 ? result : nil
|
|
107
|
+ result.status != nil ? result : nil
|
108
|
108
|
rescue
|
109
|
109
|
nil
|
110
|
110
|
end
|